#ifndef SERIAL_CONFIG_H
#define SERIAL_CONFIG_H
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QMessageBox>
#include <QDialog>

namespace Ui {
class serial_config;
}

class serial_config : public QDialog
{
    Q_OBJECT

public:
    explicit serial_config(QWidget *parent = nullptr);
    ~serial_config();

private:
    Ui::serial_config *ui;
    QSerialPort serial;  // 用实例代替指针
private slots:
    void scan_btn_click();  // 槽函数声明
    void open_serial_btn_click();
signals:
    void serial_port_selected(const QString &port_name);
};

#endif // SERIAL_CONFIG_H
